Skip to content

fix: use heredoc for PROMPT to fix YAML block scalar indentation#16

Merged
zzgosh merged 1 commit intomainfrom
fix/yaml-heredoc-prompt
Mar 19, 2026
Merged

fix: use heredoc for PROMPT to fix YAML block scalar indentation#16
zzgosh merged 1 commit intomainfrom
fix/yaml-heredoc-prompt

Conversation

@zzgosh
Copy link
Copy Markdown
Owner

@zzgosh zzgosh commented Mar 19, 2026

Problem

PR #15 introduced a YAML parsing error in release.yml.

The PROMPT="..." multiline string assignment had its continuation lines (the prompt body text) at column 0, while the surrounding run: | block uses 10-space indentation. YAML block scalars determine their indentation level from the first non-empty content line — when a non-empty line appears with less indentation than the block level, the YAML parser considers the block ended.

Symptoms:

  • Workflow name displayed as .github/workflows/release.yml instead of Release (GitHub falls back to file path when YAML fails to parse the name: field correctly)
  • Workflow triggered unexpectedly on push events
  • Release notes step failures

Fix

Replace the bare multiline string with a bash heredoc (<<END_PROMPT). All lines are now properly indented at 10 spaces within the YAML block scalar, so the YAML parser sees the entire run: block as valid.

After YAML strips the 10-space indent, bash receives the heredoc with END_PROMPT at column 0 (the correct terminator position) and the prompt content starting at column 0 as intended.

The multiline PROMPT string started at column 0, which caused the YAML
parser to end the run block early (block scalar indentation level is
determined by the first content line at 10 spaces). This broke YAML
parsing entirely, causing the workflow name to display as the file path
and the workflow to misfire on push events.

Replace with a bash heredoc; all lines are now at 10-space YAML
indentation so the block scalar is parsed correctly.
@zzgosh zzgosh merged commit 70bbf3b into main Mar 19, 2026
3 checks passed
@zzgosh zzgosh deleted the fix/yaml-heredoc-prompt branch March 19, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant